Imports Microsoft.VisualBasic
Imports System.data.Common

Public Class MySqlDataReader
    Inherits DbDataReader

    Private ReadOnly _reader As MySql.Data.MySqlClient.MySqlDataReader

    Sub New(ByVal reader As MySql.Data.MySqlClient.MySqlDataReader)

        Me._reader = reader

    End Sub

    Public Overrides Sub Close()

        Me._reader.Close()

    End Sub

    Public Overrides ReadOnly Property Depth() As Integer
        Get
            Return Me._reader.Depth
        End Get
    End Property

    Public Overrides ReadOnly Property FieldCount() As Integer
        Get
            Return Me._reader.FieldCount
        End Get
    End Property

    Public Overrides Function GetBoolean(ByVal ordinal As Integer) As Boolean

        Return Me._reader.GetBoolean(ordinal)

    End Function

    Public Overrides Function GetByte(ByVal ordinal As Integer) As Byte

        Return Me._reader.GetByte(ordinal)

    End Function

    Public Overrides Function GetBytes(ByVal ordinal As Integer, ByVal dataOffset As Long, ByVal buffer() As Byte, ByVal bufferOffset As Integer, ByVal length As Integer) As Long

        Return Me._reader.GetBytes(ordinal, dataOffset, buffer, bufferOffset, length)

    End Function

    Public Overrides Function GetChar(ByVal ordinal As Integer) As Char

        Return Me._reader.GetChar(ordinal)

    End Function

    Public Overrides Function GetChars(ByVal ordinal As Integer, ByVal dataOffset As Long, ByVal buffer() As Char, ByVal bufferOffset As Integer, ByVal length As Integer) As Long

        Return Me._reader.GetChars(ordinal, dataOffset, buffer, bufferOffset, length)

    End Function

    Public Overrides Function GetDataTypeName(ByVal ordinal As Integer) As String

        Return Me._reader.GetDataTypeName(ordinal)

    End Function

    Public Overrides Function GetDateTime(ByVal ordinal As Integer) As Date

        Return Me._reader.GetDateTime(ordinal)

    End Function

    Public Overrides Function GetDecimal(ByVal ordinal As Integer) As Decimal

        Return Me._reader.GetDecimal(ordinal)

    End Function

    Public Overrides Function GetDouble(ByVal ordinal As Integer) As Double

        Return Me._reader.GetDouble(ordinal)

    End Function

    Public Overrides Function GetEnumerator() As System.Collections.IEnumerator

        Throw New ApplicationException("Unsupported function.")

    End Function

    Public Overrides Function GetFieldType(ByVal ordinal As Integer) As System.Type

        Return Me._reader.GetFieldType(ordinal)

    End Function

    Public Overrides Function GetFloat(ByVal ordinal As Integer) As Single

        Return Me._reader.GetFloat(ordinal)

    End Function

    Public Overrides Function GetGuid(ByVal ordinal As Integer) As System.Guid

        Return Me._reader.GetGuid(ordinal)

    End Function

    Public Overrides Function GetInt16(ByVal ordinal As Integer) As Short

        Return Me._reader.GetInt16(ordinal)

    End Function

    Public Overrides Function GetInt32(ByVal ordinal As Integer) As Integer

        Return Me._reader.GetInt32(ordinal)

    End Function

    Public Overrides Function GetInt64(ByVal ordinal As Integer) As Long

        Return Me._reader.GetInt64(ordinal)

    End Function

    Public Overrides Function GetName(ByVal ordinal As Integer) As String

        Return Me._reader.GetName(ordinal)

    End Function

    Public Overrides Function GetOrdinal(ByVal name As String) As Integer

        Return Me._reader.GetOrdinal(name)

    End Function

    Public Overrides Function GetSchemaTable() As System.Data.DataTable

        Return Me._reader.GetSchemaTable()

    End Function

    Public Overrides Function GetString(ByVal ordinal As Integer) As String

        Return Me._reader.GetString(ordinal)

    End Function

    Public Overrides Function GetValue(ByVal ordinal As Integer) As Object

        Return Me._reader.GetValue(ordinal)

    End Function

    Public Overrides Function GetValues(ByVal values() As Object) As Integer

        Return Me._reader.GetValues(values)

    End Function

    Public Overrides ReadOnly Property HasRows() As Boolean
        Get
            Return Me._reader.HasRows
        End Get
    End Property

    Public Overrides ReadOnly Property IsClosed() As Boolean
        Get
            Return Me._reader.IsClosed
        End Get
    End Property

    Public Overrides Function IsDBNull(ByVal ordinal As Integer) As Boolean

        Return Me._reader.IsDBNull(ordinal)

    End Function

    Default Public Overloads Overrides ReadOnly Property Item(ByVal ordinal As Integer) As Object
        Get
            Return Me._reader.Item(ordinal)
        End Get
    End Property

    Default Public Overloads Overrides ReadOnly Property Item(ByVal name As String) As Object
        Get
            Return Me._reader.Item(name)
        End Get
    End Property

    Public Overrides Function NextResult() As Boolean

        Return Me._reader.NextResult()

    End Function

    Public Overrides Function Read() As Boolean

        Return Me._reader.Read()

    End Function

    Public Overrides ReadOnly Property RecordsAffected() As Integer
        Get
            Return Me._reader.RecordsAffected
        End Get
    End Property
End Class
